import { Get, Model, Post } from '@xuekl/cli-base/annotate'
import { LoginCaller, RouteCaller, UserInfoCaller, CaptchaCaller, TableCaller } from './interface'


@Model('')
export default class CommonService {
    @Post('/login')
    login(res) {
        return new LoginCaller(res.code, res).result()
    }

    @Get('/getRouters')
    getMenus(res) {
        return new RouteCaller(res.code, res).result()
    }

    @Get('/getInfo')
    getInfo(res) {
        return new UserInfoCaller(res.code, res).result()
    }

    @Get('/captchaImage')
    getCaptcha(res) {
        return new CaptchaCaller(res.code, res).result()
    }

    //获取表格列
    @Post('/base/mgt/pageColumn/getTableColumn')
    getTableCols(res) {
        return new TableCaller(res.code, res).result()
    }

    //存储表格列
    @Post('/base/mgt/pageColumn/setTableColumn')
    setTableCols(_res) {
    }

    //存储表格列
    @Post('/base/mgt/pageColumn/updateById/:id')
    updateTableCols(_res) {
    }
}